import React from 'react'
import ProcessBar from './ProcessBar'
import IconDom from '../../component/IconDom'
import QRCode from 'qrcode.react'

class SuccessCallback extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      dateArr: [],
      channelGoodsSaleInfoId: '',
      initDateArr: '',
      maxQuantity: '',
      minPremium: '',
      promotedSuccess: true
    }
  }
  componentDidMount () {

  }

  render () {
    let {tab, channelGoodsId} = this.props

    let mobileUrl = `yfyb-fusion-za-fusion-mobile-mall.test.za-tech.net/product-details?prdId=${channelGoodsId}`

    return <div className='mt16 sale-info'>
      <ProcessBar
        basicCompleteStaus
        serviceCompleteStaus
        saleCompleteStaus
        fromPage='callback'
        tab={tab}
      />
      <div className='promoted-success'>
        <div className='callback-left'>
          <span className='success-icon'>
            <IconDom code='icon-tick' />
          </span>
          <span className='success-tips'>
            Insurance product is published successfully!
            Please access the URL to have a look.
          </span>
        </div>
        <div className='callback-right'>
          <div className='url'>
            {mobileUrl}
          </div>
          <QRCode className='mt20'
            value={mobileUrl} />
        </div>
      </div>
    </div>
  }
}

export default SuccessCallback
